
<?php
/*
标签文章页面
*/
get_header();
?>

<?php if (have_posts()) : ?>

<div class="page_width">
	
	<div class="article_left">
		<div class="pagebox">
			<div class="navigate_path">
				<span><?php $tagName = single_tag_title( '', false ); printf( __( '标签:“ %s ”的文章' ), '<span>'.$tagName.'</span>' ); ?></span>
			</div>
		</div>
		
		<div class="pagebox">
	        <ul>
	          <?php
	            $postnun=1;
	            if(have_posts()):while(have_posts()):the_post();
	          ?>
	          <li class="articlelist">
	            <div class="thumbnail">
	              <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" target="_blank">
	                <?php
	                  $img_url = get_post_img();
	                  echo '<img src="'.$img_url.'" alt="'.$post->post_title.'" width="100" height="140" />'
	                  ?>
	              </a>
	            </div>
	            <div class="title">
	              <h1>
	                <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" target="_blank"><?php the_title(); ?>
	                </a>
	              </h1>
	              <?php if(is_sticky()){ ?>
	              <span>推荐</span>
	              <?php } ?>
	            </div>
	            <div class="info">
	            	<div style="display:inline-block">
		              <!--<div class="category"><?php the_category('') ?></div>
		              <div class="author"><?php the_author_posts_link(); ?></div>-->
		              <div class="date">
		                <?php the_time('Y-m-d') ?>
		              </div>
		              <div class="view">
		                <?php echo getPostViews(get_the_ID()); ?>
		              </div>
		              <div class="comment">
		                <?php comments_number('0','1','%');?>
		              </div>
	            	</div>
	            </div>
	            <div class="summary">
	              <?php the_excerpt(); ?>
	            </div>
	            <!--<div class="tag"><?php the_tags(); ?></div>-->
	          </li>
	          <?php $postnun++; endwhile; else: ?>
	          <li class="articlelist">
	            <div class="nothing">抱歉，暂无相关内容！</div>
	          </li>
	          <?php endif; ?>
	        </ul>
	        <div class="page">
	        	<?php posts_pagenavi(); ?>
	        </div>
	    </div>
	</div>
	<?php get_sidebar(); ?>
</div>

<?php else : ?>
<div class="no-result">
	<h1> <?php _e( 'No Results Found', 'PhotoBroad' ); ?></h1>
	<p><?php _e( 'The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.', 'PhotoBroad' ); ?></p>
</div>
<?php endif; ?>
<div class="navigation" id="navigation"><?php next_posts_link( '' ) ?></div>

<?php get_footer(); ?>